#pragma once


// Source of GetUnconnectedPin and ConnectFilters
// can be found in MSDN
HRESULT GetUnconnectedPin(
    IBaseFilter *pFilter,   // Pointer to the filter.
    PIN_DIRECTION PinDir,   // Direction of the pin to find.
    IPin **ppPin);           // Receives a pointer to the pin.

HRESULT ConnectFilters(
    IGraphBuilder *pGraph, // Filter Graph Manager.
    IPin *pOut,            // Output pin on the upstream filter.
    IBaseFilter *pDest);    // Downstream filter.

HRESULT WriteToSurface();

HRESULT InitDShow (ISampleGrabber **ppSGrabber,
    IMediaControl **ppControl, IMediaEvent   **ppEvent);

HRESULT ReleaseDShow(ISampleGrabber *pSGrabber, IMediaControl * pControl,
					 IMediaEvent * pEvent);
